package com.wl.center.vo.task;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 
 * @TableName customer
 */
@Data
@NoArgsConstructor
public class CustomerRecord implements  Serializable{
    /**
     *
     */
    private Integer id;

    /**
     *
     */
    private String name;

    /**
     *
     */
    private String phone;

    /**
     *
     */
   // private Date createtime;

    /**
     *
     */
   // private Date preTime;

    /**
     *
     */
    private String city;

    /**
     *
     */
    private String wechat;

    /**
     *
     */
    //private Integer sellerId;

    /**
     * 0 已报名
1 未报名
     */
    private Integer enrollStatus;

    /**
     *
     */
    private String toCountry;

    /**
     * 0 已签约
1 未签约
     */
    private Integer signStatus;

    /**
     * 0 无效
1 有效
     */
    private Integer status;

    /**
     * 0 已付定金
1 未付定金
     */
    private Integer moneyStatus;

    /**
     *
     */
    private String pay;

    /**
     *
     */
    private String typeName;
    // TODO: 2023/3/7  命名方式 

    /**
     *
     */
    private String levelName;

    /**
     *
     */
    private String countryName;

    /**
     *
     */
    private String projectName;

    /**
     *
     */
    private String agentName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public CustomerRecord(CustomerRecord customer){
        if(Objects.nonNull(customer)){
            this.agentName=customer.agentName;
            this.id=customer.id;
            this.city=customer.city;
            this.countryName=customer.countryName;
            this.name=customer.name;
            //this.createtime=customer.createtime;
            this.enrollStatus=customer.enrollStatus;
            this.levelName=customer.levelName;
            this.moneyStatus=customer.moneyStatus;
            this.pay=customer.pay;
            this.phone=customer.phone;
            this.typeName=customer.typeName;
          //  this.preTime=customer.preTime;
            this.projectName=customer.projectName;
            this.signStatus=customer.signStatus;
           // this.sellerId=customer.sellerId;
            this.wechat=customer.wechat;
            this.toCountry=customer.toCountry;
            this.status=customer.status;
        }
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CustomerRecord other = (CustomerRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            //&& (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
           // && (this.getPreTime() == null ? other.getPreTime() == null : this.getPreTime().equals(other.getPreTime()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getWechat() == null ? other.getWechat() == null : this.getWechat().equals(other.getWechat()))
           // && (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId()))
            && (this.getEnrollStatus() == null ? other.getEnrollStatus() == null : this.getEnrollStatus().equals(other.getEnrollStatus()))
            && (this.getToCountry() == null ? other.getToCountry() == null : this.getToCountry().equals(other.getToCountry()))
            && (this.getSignStatus() == null ? other.getSignStatus() == null : this.getSignStatus().equals(other.getSignStatus()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getMoneyStatus() == null ? other.getMoneyStatus() == null : this.getMoneyStatus().equals(other.getMoneyStatus()))
            && (this.getPay() == null ? other.getPay() == null : this.getPay().equals(other.getPay()))
            && (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
            && (this.getLevelName() == null ? other.getLevelName() == null : this.getLevelName().equals(other.getLevelName()))
            && (this.getCountryName() == null ? other.getCountryName() == null : this.getCountryName().equals(other.getCountryName()))
            && (this.getProjectName() == null ? other.getProjectName() == null : this.getProjectName().equals(other.getProjectName()))
            && (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
       // result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
       // result = prime * result + ((getPreTime() == null) ? 0 : getPreTime().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getWechat() == null) ? 0 : getWechat().hashCode());
       // result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode());
        result = prime * result + ((getEnrollStatus() == null) ? 0 : getEnrollStatus().hashCode());
        result = prime * result + ((getToCountry() == null) ? 0 : getToCountry().hashCode());
        result = prime * result + ((getSignStatus() == null) ? 0 : getSignStatus().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getMoneyStatus() == null) ? 0 : getMoneyStatus().hashCode());
        result = prime * result + ((getPay() == null) ? 0 : getPay().hashCode());
        result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
        result = prime * result + ((getLevelName() == null) ? 0 : getLevelName().hashCode());
        result = prime * result + ((getCountryName() == null) ? 0 : getCountryName().hashCode());
        result = prime * result + ((getProjectName() == null) ? 0 : getProjectName().hashCode());
        result = prime * result + ((getAgentName()== null) ? 0 : getAgentName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", city=").append(city);
        sb.append(", wechat=").append(wechat);
        sb.append(", enrollStatus=").append(enrollStatus);
        sb.append(", toCountry=").append(toCountry);
        sb.append(", signStatus=").append(signStatus);
        sb.append(", status=").append(status);
        sb.append(", moneyStatus=").append(moneyStatus);
        sb.append(", pay=").append(pay);
        sb.append(", typeName=").append(typeName);
        sb.append(", levelName=").append(levelName);
        sb.append(", countryName=").append(countryName);
        sb.append(", projectName=").append(projectName);
        sb.append(", agentName=").append(agentName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}